Skip to content

Conversation

@azarovalex
Copy link
Contributor

@azarovalex azarovalex commented Sep 5, 2022

Script Utilities/build-script-helper.py doesn't clean swift_flags array while iterating on different targets, which results in the wrong -target flag passed on the second iteration.

Same with base_cmake_flags array, it should not be shared between different targets.

This bug currently blocks swift toolchain cross-compiling on M1 macs.

@azarovalex
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@artemcm
Copy link
Contributor

artemcm commented Sep 6, 2022

@swift-ci test

@azarovalex
Copy link
Contributor Author

@artemcm Thanks for the review, please merge the PR since I don't have write access to the repo. (yet 😂)

@artemcm
Copy link
Contributor

artemcm commented Sep 7, 2022

@azarovalex , this CI does not run the CMake build at all.

Could you please also run a test from the main swift repo using cross-repo testing?
https://github.com/apple/swift-driver#testing-against-swift-compiler-trunk

Copy link
Contributor

@edymtt edymtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this helps, I've cross tested this PR in swiftlang/swift#60901 -- all jobs are green and swift-driver/swift-help have all archs as expected.

> lipo -archs Library/Developer/Toolchains/swift-PR-60901-293.xctoolchain/usr/bin/swift-driver 
x86_64 arm64
> lipo -archs Library/Developer/Toolchains/swift-PR-60901-293.xctoolchain/usr/bin/swift-help  
x86_64 arm64

Leaving to @artemcm to merge in case I've missed something

@artemcm artemcm merged commit 07d469f into swiftlang:main Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants